#include "Poco/MemoryStream.h"
#include "Poco/BinaryWriter.h"
#include "Poco/BinaryReader.h"

using Poco::BinaryWriter;
using Poco::BinaryReader;
#include "sstream"
int main()
{
    
    char data[100];
    //BinaryWriter bw(data,100);

   // bw.w

    std::ostringstream output;
    BinaryWriter bw(output, BinaryWriter::NETWORK_BYTE_ORDER );


    Poco::UInt32 a = 0x11223344;

    bw<<a;

    memcpy(data,output.str().c_str(),4);

    std::stringstream io;

    BinaryWriter w(io,BinaryWriter::NETWORK_BYTE_ORDER);
    w<<a;
    std::cout << a<<std::endl;

    BinaryReader r(io, BinaryReader::NETWORK_BYTE_ORDER);
    Poco::UInt32 b;
    r>>b;
    std::cout<< b << std::endl;




    return 0;
}